import 'dart:io';

import 'package:get/get.dart';
import 'package:pdzs_app/utils/utils.dart';

class UploadController extends GetxController {
  RxBool isUploading = false.obs;

  void uploadFile(File file) async {
    // 实现文件上传逻辑

    var formData = FormData({"daoru": file, "runtimeType": "formData"});
    var response =
        await Https.instance.dio.post('/index/daorutoken', data: formData);
    print(response.data);
    // 处理上传结果
  }
}
